package com.xr.blog.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 菜单表
 * 
 * @author XRJ
 * @email 1033835209@qq.com
 * @date 2020-07-07 20:31:38
 */
@Data
@Valid
@TableName("blog_menu")
public class BlogMenu implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 菜单名
	 */
	@NotBlank(groups = {Insert.class, Update.class},message = "菜单名不能为空")
	private String name;
	/**
	 * 菜单链接
	 */
	@NotBlank(groups = {Insert.class, Update.class},message = "菜单链接不能为空")
	private String url;
	/**
	 * 是否在新窗口打开菜单  0：否，1：是
	 */
	private Boolean isBlank;
	/**
	 *图标
	 */
	private String icon;
	/**
	 * 菜单排序，越小的越靠前
	 */
	@NotNull(groups = {Insert.class, Update.class},message = "菜单排序不能为空")
	private Integer sort;
}
